package com.atguigu.classroom.vod.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantPropertiesUtil implements InitializingBean {
    @Value("${qiniu.accessKey}")
    private String accessKey;
    @Value("${qiniu.secretKey}")
    private String secretKey;
    @Value("${qiniu.bucket}")
    private String bucket;
    @Value("${qiniu.url}")
    private String url;
    @Value("${qiniu.avatar}")
    private String avatar;

    public static String ACCESSKEY;
    public static String SECRETKEY;
    public static String BUCKET;
    public static String URL;
    public static String AVATAR;
    @Override
    public void afterPropertiesSet() throws Exception {
        ACCESSKEY=accessKey;
        SECRETKEY=secretKey;
        BUCKET=bucket;
        URL=url;
        AVATAR=avatar;
    }
}
